<?php
/**
 * Created by PhpStorm.
 * User: 蝙蝠侠
 * Date: 2018/9/20
 * Time: 18:36
 */

namespace app\common\model;


use think\Model;

/**   YSF
 *    订单物流表 Model
 * Class OrderLogisticsModel
 * @package app\common\model
 */
class OrderLogisticsModel extends Model
{
    // 表名
    protected $name = 'order_logistics';

    // 添加
    public function add($data)
    {
        $result = $this->insertGetId($data);
        return $result;
    }
    // 列表查询
    public function getAll($where,$page=1, $pageSize=-1, $field='*', $order='create_time desc')
    {
        $result = $this->where($where)
                    ->field($field)
                    ->page($page, $pageSize)
                    ->order($order)
                    ->select();
//        echo Db::name($dbName)->getLastSql();die();
        return $result;
    }
}